<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class StudentCardCreate extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'card_type_id' => 'required',
            'expire_time' => 'required|date_format:U',
            'start_time' => 'required|date_format:U',
            'is_auto_active' => 'required',
            'total' => 'required',
            'remark' => 'sometimes|required|min:0|max:100',
            'student_id' => 'required'
        ];
    }
}
